%module OgreTechnique

%{
#include "OGRE/OgreTechnique.h"
	%}

%import "OgrePrerequisites.i"
 //#include "OgreIteratorWrappers.h"
%import "OgreBlendMode.i"
%import "OgreCommon.i"
 //%import "OgrePass.i"
 //#include "OgreIteratorWrappers.h"
 //#include "OgreRenderSystemCapabilities.h"
 //#include "OgreUserObjectBindings.h"

 //%import "OgreMaterial.i"

namespace Ogre {

	class Pass;
	class Material;

	class Technique //: public TechniqueAlloc
    {
	public:

		enum IncludeOrExclude
		{
			/// Inclusive - only support if present
			INCLUDE = 0,
			/// Exclusive - do not support if present
			EXCLUDE = 1
		};
/*
		struct GPUVendorRule
		{
			GPUVendor vendor;
			IncludeOrExclude includeOrExclude;
			GPUVendorRule()
				: vendor(GPU_UNKNOWN), includeOrExclude(EXCLUDE) {}
			GPUVendorRule(GPUVendor v, IncludeOrExclude ie)
				: vendor(v), includeOrExclude(ie) {}
		};
*/
		/// Rule controlling whether technique is deemed supported based on GPU device name
/*
		struct GPUDeviceNameRule
		{
			String devicePattern;
			IncludeOrExclude includeOrExclude;
			bool caseSensitive;
			GPUDeviceNameRule()
				: includeOrExclude(EXCLUDE), caseSensitive(false) {}
			GPUDeviceNameRule(const String& pattern, IncludeOrExclude ie, bool caseSen)
				: devicePattern(pattern), includeOrExclude(ie), caseSensitive(caseSen) {}
		};
*/
//		typedef vector<GPUVendorRule>::type GPUVendorRuleList;
//		typedef vector<GPUDeviceNameRule>::type GPUDeviceNameRuleList;

        /// Constructor
        Technique(Material* parent);
        /// Copy constructor
        Technique(Material* parent, const Technique& oth);
        ~Technique();

        bool isSupported(void) const;

//        String _compile(bool autoManageTextureUnits);

//		bool checkGPURules(StringUtil::StrStreamType& errors);

//		bool checkHardwareSupport(bool autoManageTextureUnits, StringUtil::StrStreamType& compileErrors);

//        void _compileIlluminationPasses(void);


        Pass* createPass(void);

        Pass* getPass(unsigned short index);

        Pass* getPass(const String& name);

        unsigned short getNumPasses(void) const;

        void removePass(unsigned short index);

        void removeAllPasses(void);

        bool movePass(const unsigned short sourceIndex, const unsigned short destinationIndex);
//        typedef VectorIterator<Passes> PassIterator;

//        const PassIterator getPassIterator(void);
//        typedef VectorIterator<IlluminationPassList> IlluminationPassIterator;

//        const IlluminationPassIterator getIlluminationPassIterator(void);

        Material* getParent(void) const { return mParent; }

        Technique& operator=(const Technique& rhs);

	const String& getResourceGroup(void) const;

	bool isTransparent(void) const;

//	bool isTransparentSortingEnabled(void) const;

//	bool isTransparentSortingForced(void) const;

//        void _prepare(void);

//        void _unprepare(void);

//        void _load(void);

//        void _unload(void);

        bool isLoaded(void) const;

        void setPointSize(Real ps);

        void setAmbient(Real red, Real green, Real blue);

        void setAmbient(const ColourValue& ambient);

        void setDiffuse(Real red, Real green, Real blue, Real alpha);

        void setDiffuse(const ColourValue& diffuse);

        void setSpecular(Real red, Real green, Real blue, Real alpha);

        void setSpecular(const ColourValue& specular);

        void setShininess(Real val);

        void setSelfIllumination(Real red, Real green, Real blue);

        void setSelfIllumination(const ColourValue& selfIllum);

        void setDepthCheckEnabled(bool enabled);

        void setDepthWriteEnabled(bool enabled);

//        void setDepthFunction( CompareFunction func );

	void setColourWriteEnabled(bool enabled);

//        void setCullingMode( CullingMode mode );

//        void setManualCullingMode( ManualCullingMode mode );

        void setLightingEnabled(bool enabled);

//        void setShadingMode( ShadeOptions mode );

        void setFog(
            bool overrideScene,
            FogMode mode = FOG_NONE,
            const ColourValue& colour = ColourValue::White,
            Real expDensity = 0.001, Real linearStart = 0.0, Real linearEnd = 1.0 );

        void setDepthBias(float constantBias, float slopeScaleBias);

//        void setTextureFiltering(TextureFilterOptions filterType);

        void setTextureAnisotropy(unsigned int maxAniso);

//        void setSceneBlending( const SceneBlendType sbt );

//        void setSeparateSceneBlending( const SceneBlendType sbt, const SceneBlendType sbta );

//        void setSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor);

//        void setSeparateSceneBlending( const SceneBlendFactor sourceFactor, const SceneBlendFactor destFactor, const SceneBlendFactor sourceFactorAlpha, const SceneBlendFactor destFactorAlpha);


        void setLodIndex(unsigned short index);

        unsigned short getLodIndex(void) const { return mLodIndex; }

	void setSchemeName(const String& schemeName);

	const String& getSchemeName(void) const;
		
//	unsigned short _getSchemeIndex(void) const;

        bool isDepthWriteEnabled(void) const;

        bool isDepthCheckEnabled(void) const;

        bool hasColourWriteDisabled(void) const;

        void setName(const String& name);

        const String& getName(void) const { return mName; }

//        bool applyTextureAliases(const AliasTextureNamePairList& aliasList, const bool apply = true) const;

//		void addGPUVendorRule(GPUVendor vendor, IncludeOrExclude includeOrExclude);

//		void addGPUVendorRule(const GPUVendorRule& rule);

//		void removeGPUVendorRule(GPUVendor vendor);
//		typedef ConstVectorIterator<GPUVendorRuleList> GPUVendorRuleIterator;

//		GPUVendorRuleIterator getGPUVendorRuleIterator() const;

//		void addGPUDeviceNameRule(const String& devicePattern, IncludeOrExclude includeOrExclude, bool caseSensitive = false);

//		void addGPUDeviceNameRule(const GPUDeviceNameRule& rule);

//		void removeGPUDeviceNameRule(const String& devicePattern);
//		typedef ConstVectorIterator<GPUDeviceNameRuleList> GPUDeviceNameRuleIterator;

//		GPUDeviceNameRuleIterator getGPUDeviceNameRuleIterator() const;

//		UserObjectBindings&	getUserObjectBindings() { return mUserObjectBindings; }

//		const UserObjectBindings& getUserObjectBindings() const { return mUserObjectBindings; }

    };
}
